<?php 
	require_once 'dao/dao_get_currentdate.php'; 
	session_start();
	session_cache_limiter('private');
	if(!isset($_SESSION['userid'])||!isset($_SESSION['password'])){
		header('Location:login.php');
	}
	function currentweek(){
		$result=get_current_date();
		$row=mysql_fetch_array($result);
		$date=$row['DiffDate'];
		$currentweek=floor($date/7);
		if($date%7!=0){
			$currentweek++;
		}
		return $currentweek;
	}
	date_default_timezone_set("Asia/Shanghai");
	
?>
<div id="header">
<div id="header_userinf">
<span id="username"><?php echo $_SESSION['username']?></span> |
<span id="header_date"><?php echo date("Y").YEAR.date("m").MONTH.date("d").DAY." ".date("l");?></span> <?php echo DI.currentweek().WEEK?> |
<span><a href="service/service_signout.php"><?php echo QUIT?></a></span>
</div>
<div id="header_bar"><h1><?php echo SYSTITLE;?></h1></div>
<div id="systitle"></div>
</div>